home *** CD-ROM | disk | FTP | other *** search
/ Software Vault: The Gold Collection / Software Vault - The Gold Collection (American Databankers) (1993).ISO / cdr48 / pasclern.zip / PROCED3.PAS < prev    next >
Pascal/Delphi Source File  |  1993-04-01  |  526b  |  19 lines

  1. PROGRAM make_a_fruit_salad;
  2.  
  3. VAR apple,orange,pear,fruit : INTEGER;
  4.  
  5. PROCEDURE add_the_fruit(value1,value2 : INTEGER;  (* one-way *)
  6.                        VAR total      : INTEGER;  (* two-way *)
  7.                        value3         : INTEGER); (* one-way *)
  8. BEGIN
  9.   total := value1 + value2 + value3;
  10. END;
  11.  
  12. BEGIN  (* main program *)
  13.   apple := 4;
  14.   orange := 5;
  15.   pear := 7;
  16.   add_the_fruit(apple,orange,fruit,pear);
  17.   WRITELN('The fruit basket contains ',fruit:3,' fruits');
  18. END.  (* of main program *)
  19.